﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

namespace Lottery
{
    public partial class showimg : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            String id = Request["id"];
            try
            {
                string strSQL = "select pic FROM IDCARD where cardid = '" + id + "'";
                byte[] bt = (byte[])DbHelper.ExecuteScalar(System.Data.CommandType.Text, strSQL);
                Response.ContentType = "image/jpeg";
                Response.BinaryWrite(bt);
                Response.End();
            }
            catch
            {
            }
        }
    }
}